protecting java program from attack